<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>03-循环语句</title>

</head>
<body>

<script>
    let array = ["a", "b", "c"];

    for (let element of array) {
        console.log(element);

    }

    for (let i = 0; i < array.length; i++) {
        console.log(i + "," + array[i]);

    }

    for (let index in array) {
        console.log(index);

        console.log(array[index]);
    }

</script>


<script>
    let jsObj = {
        name: "zs",
        age: 187,
        married: true
    }

    for (let index in jsObj) {
        console.log(index+","+jsObj[index])
    }


</script>

</body>
</html>